<template>
  <div>
    <table class="owntable tableLayout" border="0" cellspacing="0" cellpadding="1" width="100%">
      <tr>
        <td width="150">生产管理(成品)编号</td>
        <td>{{ item.number }}</td>
        <td width="150">生产批号</td>
        <td>{{ item.batchNumber }}</td>
      </tr>
      <tr>
        <td>产品名称</td>
        <td>{{ item.productName }}</td>
        <td>规格型号</td>
        <td>{{ item.productSku }}</td>
      </tr>
      <tr>
        <td>产品代码</td>
        <td>{{ item.productCode }}</td>
        <td>生产日期</td>
        <td>{{ item.productionDate }}</td>
      </tr>
      <tr>
        <td>管理部门</td>
        <td>{{ item.manageDeptName }}</td>
        <td>负责人</td>
        <td>{{ item.manageUserName }}</td>
      </tr>
      <tr>
        <td>编制部门</td>
        <td colspan="3">{{ item.createDeptName }}</td>
      </tr>
      <tr style="height: 20px;"></tr>
      <tr>
        <td>是否有特殊过程</td>
        <td colspan="3">{{ item.isProcess == 0 ? '否' : '是' }}</td>
      </tr>
    </table>

    <table class="table1 owntable tableLayout" border="0" cellspacing="0" cellpadding="1" width="100%" v-if="item.processNamesList && item.processNamesList.length!=0">
      <tr><td colspan="2">特殊过程名称</td></tr>
      <tr>
        <td class="flex_between white_bg" style="width: 50%;display: inline-flex;" v-for="(v, i) in item.processNamesList" :key="i">
          <span>{{ v.name }}</span>
          <el-button size="mini" plain>查看</el-button>
        </td>
      </tr>
    </table>
    <table class="table1 owntable mb20 tableLayout" border="0" cellspacing="0" cellpadding="1" width="100%" v-if="item.gongxuList && item.gongxuList.length!=0">
      <tr><td width="150" colspan="4">生产工序</td></tr>
      <tr>
        <td class="flex_between white_bg" style="width: 50%;display: inline-flex;" v-for="(v, i) in item.gongxuList" :key="i">
          <span>{{ v.name }}</span>
          <el-button size="mini" plain>查看</el-button>
        </td>
      </tr>
    </table>
    <showgongxu ref="showgongxu"></showgongxu>
  </div>
</template>

<script>
import showgongxu from './showgongxu.vue';
export default {
  props: {
    item: {}
  },
  components: {
    showgongxu
  },
  methods: {
    showItem(item) {
      item.operateUserIdList = item.operateUserId && item.operateUserId.split(',');
      this.$refs.showgongxu.init(item);
    }
  }
};
</script>

<style></style>
